package com.yixing.tech.common.autoline.domain;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 下发任务给堆垛机WCS的请求参数
 * */
public class StackerCraneWCSTaskRequest implements Serializable {

    @JsonProperty("INSTRUCTION_CODE")
    private String INSTRUCTION_CODE; // 任务编号 唯一 必传
    @JsonProperty("AREA_CODE")
    private String AREA_CODE;       // 区域编号 必传
    @JsonProperty("SALVER_ID")
    private String SALVER_ID;       // 托盘号 必传
    @JsonProperty("START_LOCATION")
    private String START_LOCATION;  // 起始位置 必传
    @JsonProperty("END_LOCATION")
    private String END_LOCATION;    // 结束位置 必传
    @JsonProperty("TASK_TYPE")
    private Integer TASK_TYPE;       // 作业类型 1:入库 2:出库 3:移库 必传
    @JsonProperty("PRI")
    private Integer PRI;             // 优先级(越大优先级越高) 必传
    @JsonProperty("STATION_CODE")
    private String STATION_CODE;     // 站台号(出库类型作业必传)
    @JsonProperty("TASK_DETAIL_LIST")
    private List<TaskDetail> TASK_DETAIL_LIST;  // 任务物料信息列表

    public String getINSTRUCTION_CODE() {
        return INSTRUCTION_CODE;
    }

    public void setINSTRUCTION_CODE(String INSTRUCTION_CODE) {
        this.INSTRUCTION_CODE = INSTRUCTION_CODE;
    }

    public String getAREA_CODE() {
        return AREA_CODE;
    }

    public void setAREA_CODE(String AREA_CODE) {
        this.AREA_CODE = AREA_CODE;
    }

    public String getSALVER_ID() {
        return SALVER_ID;
    }

    public void setSALVER_ID(String SALVER_ID) {
        this.SALVER_ID = SALVER_ID;
    }

    public String getSTART_LOCATION() {
        return START_LOCATION;
    }

    public void setSTART_LOCATION(String START_LOCATION) {
        this.START_LOCATION = START_LOCATION;
    }

    public String getEND_LOCATION() {
        return END_LOCATION;
    }

    public void setEND_LOCATION(String END_LOCATION) {
        this.END_LOCATION = END_LOCATION;
    }

    public Integer getTASK_TYPE() {
        return TASK_TYPE;
    }

    public void setTASK_TYPE(Integer TASK_TYPE) {
        this.TASK_TYPE = TASK_TYPE;
    }

    public Integer getPRI() {
        return PRI;
    }

    public void setPRI(Integer PRI) {
        this.PRI = PRI;
    }

    public String getSTATION_CODE() {
        return STATION_CODE;
    }

    public void setSTATION_CODE(String STATION_CODE) {
        this.STATION_CODE = STATION_CODE;
    }

    public List<TaskDetail> getTASK_DETAIL_LIST() {
        return TASK_DETAIL_LIST;
    }

    public void setTASK_DETAIL_LIST(List<TaskDetail> TASK_DETAIL_LIST) {
        this.TASK_DETAIL_LIST = TASK_DETAIL_LIST;
    }

    @Override
    public String toString() {
        return "WCSTaskRequest{" +
                "INSTRUCTION_CODE='" + INSTRUCTION_CODE + '\'' +
                ", AREA_CODE='" + AREA_CODE + '\'' +
                ", SALVER_ID='" + SALVER_ID + '\'' +
                ", START_LOCATION='" + START_LOCATION + '\'' +
                ", END_LOCATION='" + END_LOCATION + '\'' +
                ", TASK_TYPE=" + TASK_TYPE +
                ", PRI=" + PRI +
                ", STATION_CODE='" + STATION_CODE + '\'' +
                ", TASK_DETAIL_LIST=" + TASK_DETAIL_LIST +
                '}';
    }

    public static class TaskDetail implements Serializable {
        @JsonProperty("MATERIAL_CODE")
        private String MATERIAL_CODE;   // 物料编码 必传
        @JsonProperty("MATERIAL_DESC")
        private String MATERIAL_DESC;   // 物料描述
        @JsonProperty("BATCH")
        private String BATCH;           // 批次号

        @JsonProperty("QUANTITY")
        private BigDecimal QUANTITY;       // 数量 必传

        public TaskDetail() {
        }

        public TaskDetail(String MATERIAL_CODE, String MATERIAL_DESC, String BATCH, BigDecimal QUANTITY) {
            this.MATERIAL_CODE = MATERIAL_CODE;
            this.MATERIAL_DESC = MATERIAL_DESC;
            this.BATCH = BATCH;
            this.QUANTITY = QUANTITY;
        }

        public String getMATERIAL_CODE() {
            return MATERIAL_CODE;
        }

        public void setMATERIAL_CODE(String MATERIAL_CODE) {
            this.MATERIAL_CODE = MATERIAL_CODE;
        }

        public String getMATERIAL_DESC() {
            return MATERIAL_DESC;
        }

        public void setMATERIAL_DESC(String MATERIAL_DESC) {
            this.MATERIAL_DESC = MATERIAL_DESC;
        }

        public String getBATCH() {
            return BATCH;
        }

        public void setBATCH(String BATCH) {
            this.BATCH = BATCH;
        }

        public BigDecimal getQUANTITY() {
            return QUANTITY;
        }

        public void setQUANTITY(BigDecimal QUANTITY) {
            this.QUANTITY = QUANTITY;
        }

        @Override
        public String toString() {
            return "TaskDetail{" +
                    "MATERIAL_CODE='" + MATERIAL_CODE + '\'' +
                    ", MATERIAL_DESC='" + MATERIAL_DESC + '\'' +
                    ", BATCH='" + BATCH + '\'' +
                    ", QUANTITY=" + QUANTITY +
                    '}';
        }
    }
}
